// ****************************************************************************** 
// Copyright     :  Copyright (C) 2018, Hisilicon Technologies Co. Ltd.
// File name     :  vpc_pipe_nmanager_c_union_define.h
// Project line  :  Platform And Key Technologies Development
// Department    :  CAD Development Department
// Author        :  xxx
// Version       :  1.0
// Date          :  2013/3/10
// Description   :  The description of xxx project
// Others        :  Generated automatically by nManager V4.2 
// History       :  xxx 2018/03/19 14:39:47 Create file
// ******************************************************************************

#ifndef __VPC_PIPE_NMANAGER_C_UNION_DEFINE_H__
#define __VPC_PIPE_NMANAGER_C_UNION_DEFINE_H__

/* Define the union U_IN_SWAP */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_0          : 23  ; /* [31:9] */
        unsigned int    in_swap_en_cfg : 1  ; /* [8] */
        unsigned int    in_swap_cfg    : 8  ; /* [7:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_IN_SWAP;

/* Define the union U_RGB2YUV_1 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_1          : 7  ; /* [31:25] */
        unsigned int    rgb2yuv_coeff1 : 9  ; /* [24:16] */
        unsigned int    rsv_2          : 7  ; /* [15:9] */
        unsigned int    rgb2yuv_coeff0 : 9  ; /* [8:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_RGB2YUV_1;

/* Define the union U_RGB2YUV_2 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_3          : 7  ; /* [31:25] */
        unsigned int    rgb2yuv_coeff3 : 9  ; /* [24:16] */
        unsigned int    rsv_4          : 7  ; /* [15:9] */
        unsigned int    rgb2yuv_coeff2 : 9  ; /* [8:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_RGB2YUV_2;

/* Define the union U_RGB2YUV_3 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_5          : 7  ; /* [31:25] */
        unsigned int    rgb2yuv_coeff5 : 9  ; /* [24:16] */
        unsigned int    rsv_6          : 7  ; /* [15:9] */
        unsigned int    rgb2yuv_coeff4 : 9  ; /* [8:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_RGB2YUV_3;

/* Define the union U_RGB2YUV_4 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_7          : 7  ; /* [31:25] */
        unsigned int    rgb2yuv_coeff7 : 9  ; /* [24:16] */
        unsigned int    rsv_8          : 7  ; /* [15:9] */
        unsigned int    rgb2yuv_coeff6 : 9  ; /* [8:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_RGB2YUV_4;

/* Define the union U_RGB2YUV_5 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_9           : 7  ; /* [31:25] */
        unsigned int    rgb2yuv_offset0 : 9  ; /* [24:16] */
        unsigned int    rsv_10          : 7  ; /* [15:9] */
        unsigned int    rgb2yuv_coeff8  : 9  ; /* [8:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_RGB2YUV_5;

/* Define the union U_RGB2YUV_6 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_11          : 7  ; /* [31:25] */
        unsigned int    rgb2yuv_offset2 : 9  ; /* [24:16] */
        unsigned int    rsv_12          : 7  ; /* [15:9] */
        unsigned int    rgb2yuv_offset1 : 9  ; /* [8:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_RGB2YUV_6;

/* Define the union U_UVDEC_1 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_13           : 6  ; /* [31:26] */
        unsigned int    uvdec_m_filter_1 : 10  ; /* [25:16] */
        unsigned int    rsv_14           : 6  ; /* [15:10] */
        unsigned int    uvdec_m_filter_0 : 10  ; /* [9:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_UVDEC_1;

/* Define the union U_UVDEC_2 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_15           : 6  ; /* [31:26] */
        unsigned int    uvdec_m_filter_3 : 10  ; /* [25:16] */
        unsigned int    rsv_16           : 6  ; /* [15:10] */
        unsigned int    uvdec_m_filter_2 : 10  ; /* [9:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_UVDEC_2;

/* Define the union U_UVDEC_3 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_17           : 6  ; /* [31:26] */
        unsigned int    uvdec_m_filter_5 : 10  ; /* [25:16] */
        unsigned int    rsv_18           : 6  ; /* [15:10] */
        unsigned int    uvdec_m_filter_4 : 10  ; /* [9:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_UVDEC_3;

/* Define the union U_PRECROP_1 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_19       : 3  ; /* [31:29] */
        unsigned int    precrop_hmin : 13  ; /* [28:16] */
        unsigned int    rsv_20       : 3  ; /* [15:13] */
        unsigned int    precrop_hmax : 13  ; /* [12:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_PRECROP_1;

/* Define the union U_PRECROP_2 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_21       : 3  ; /* [31:29] */
        unsigned int    precrop_vmin : 13  ; /* [28:16] */
        unsigned int    rsv_22       : 3  ; /* [15:13] */
        unsigned int    precrop_vmax : 13  ; /* [12:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_PRECROP_2;

/* Define the union U_POSTCROP1_1 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_23         : 3  ; /* [31:29] */
        unsigned int    postcrop1_hmin : 13  ; /* [28:16] */
        unsigned int    rsv_24         : 3  ; /* [15:13] */
        unsigned int    postcrop1_hmax : 13  ; /* [12:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_POSTCROP1_1;

/* Define the union U_POSTCROP1_2 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_25         : 3  ; /* [31:29] */
        unsigned int    postcrop1_vmin : 13  ; /* [28:16] */
        unsigned int    rsv_26         : 3  ; /* [15:13] */
        unsigned int    postcrop1_vmax : 13  ; /* [12:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_POSTCROP1_2;

/* Define the union U_POSTCROP2_1 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_27         : 3  ; /* [31:29] */
        unsigned int    postcrop2_hmin : 13  ; /* [28:16] */
        unsigned int    rsv_28         : 3  ; /* [15:13] */
        unsigned int    postcrop2_hmax : 13  ; /* [12:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_POSTCROP2_1;

/* Define the union U_POSTCROP2_2 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_29         : 3  ; /* [31:29] */
        unsigned int    postcrop2_vmin : 13  ; /* [28:16] */
        unsigned int    rsv_30         : 3  ; /* [15:13] */
        unsigned int    postcrop2_vmax : 13  ; /* [12:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_POSTCROP2_2;

/* Define the union U_PIPE_CTRL */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_31           : 29  ; /* [31:3] */
        unsigned int    vpc_out2_sel     : 1  ; /* [2] */
        unsigned int    vpc_out2_pipe_en : 1  ; /* [1] */
        unsigned int    vpc_out1_pipe_en : 1  ; /* [0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_PIPE_CTRL;

/* Define the union U_PIPE_INFOR_1 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    vpc_pipe_vp_infor1 : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_PIPE_INFOR_1;

/* Define the union U_PIPE_INFOR_2 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    vpc_pipe_vp_infor2 : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_PIPE_INFOR_2;

/* Define the union U_PIPE_INFOR_3 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    vpc_pipe_vp_infor3 : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_PIPE_INFOR_3;

/* Define the union U_PIPE_BUSY_INFOR */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    vpc_pipe_busy : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_PIPE_BUSY_INFOR;

/* Define the union U_Y_SUM */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    y_sum_stat : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_Y_SUM;

/* Define the union U_U_SUM */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    u_sum_stat : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_U_SUM;

/* Define the union U_V_SUM */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    v_sum_stat : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_V_SUM;


//==============================================================================
/* Define the global struct */
typedef struct
{
    volatile U_IN_SWAP         IN_SWAP         ; /* 0 */
    volatile U_RGB2YUV_1       RGB2YUV_1       ; /* 4 */
    volatile U_RGB2YUV_2       RGB2YUV_2       ; /* 8 */
    volatile U_RGB2YUV_3       RGB2YUV_3       ; /* C */
    volatile U_RGB2YUV_4       RGB2YUV_4       ; /* 10 */
    volatile U_RGB2YUV_5       RGB2YUV_5       ; /* 14 */
    volatile U_RGB2YUV_6       RGB2YUV_6       ; /* 18 */
    volatile U_UVDEC_1         UVDEC_1         ; /* 1C */
    volatile U_UVDEC_2         UVDEC_2         ; /* 20 */
    volatile U_UVDEC_3         UVDEC_3         ; /* 24 */
    volatile U_PRECROP_1       PRECROP_1       ; /* 28 */
    volatile U_PRECROP_2       PRECROP_2       ; /* 2C */
    volatile U_POSTCROP1_1     POSTCROP1_1     ; /* 30 */
    volatile U_POSTCROP1_2     POSTCROP1_2     ; /* 34 */
    volatile U_POSTCROP2_1     POSTCROP2_1     ; /* 38 */
    volatile U_POSTCROP2_2     POSTCROP2_2     ; /* 3C */
    volatile U_PIPE_CTRL       PIPE_CTRL       ; /* 40 */
    volatile U_PIPE_INFOR_1    PIPE_INFOR_1    ; /* 44 */
    volatile U_PIPE_INFOR_2    PIPE_INFOR_2    ; /* 48 */
    volatile U_PIPE_INFOR_3    PIPE_INFOR_3    ; /* 4C */
    volatile U_PIPE_BUSY_INFOR PIPE_BUSY_INFOR ; /* 50 */
    volatile U_Y_SUM           Y_SUM           ; /* 54 */
    volatile U_U_SUM           U_SUM           ; /* 58 */
    volatile U_V_SUM           V_SUM           ; /* 5C */

} S_vpc_pipe_nmanager_REGS_TYPE;

/* Declare the struct pointor of the module vpc_pipe_nmanager */
extern volatile S_vpc_pipe_nmanager_REGS_TYPE *gopvpc_pipe_nmanagerAllReg;

/* Declare the functions that set the member value */
int iSetIN_SWAP_in_swap_en_cfg(unsigned int uin_swap_en_cfg);
int iSetIN_SWAP_in_swap_cfg(unsigned int uin_swap_cfg);
int iSetRGB2YUV_1_rgb2yuv_coeff1(unsigned int urgb2yuv_coeff1);
int iSetRGB2YUV_1_rgb2yuv_coeff0(unsigned int urgb2yuv_coeff0);
int iSetRGB2YUV_2_rgb2yuv_coeff3(unsigned int urgb2yuv_coeff3);
int iSetRGB2YUV_2_rgb2yuv_coeff2(unsigned int urgb2yuv_coeff2);
int iSetRGB2YUV_3_rgb2yuv_coeff5(unsigned int urgb2yuv_coeff5);
int iSetRGB2YUV_3_rgb2yuv_coeff4(unsigned int urgb2yuv_coeff4);
int iSetRGB2YUV_4_rgb2yuv_coeff7(unsigned int urgb2yuv_coeff7);
int iSetRGB2YUV_4_rgb2yuv_coeff6(unsigned int urgb2yuv_coeff6);
int iSetRGB2YUV_5_rgb2yuv_offset0(unsigned int urgb2yuv_offset0);
int iSetRGB2YUV_5_rgb2yuv_coeff8(unsigned int urgb2yuv_coeff8);
int iSetRGB2YUV_6_rgb2yuv_offset2(unsigned int urgb2yuv_offset2);
int iSetRGB2YUV_6_rgb2yuv_offset1(unsigned int urgb2yuv_offset1);
int iSetUVDEC_1_uvdec_m_filter_1(unsigned int uuvdec_m_filter_1);
int iSetUVDEC_1_uvdec_m_filter_0(unsigned int uuvdec_m_filter_0);
int iSetUVDEC_2_uvdec_m_filter_3(unsigned int uuvdec_m_filter_3);
int iSetUVDEC_2_uvdec_m_filter_2(unsigned int uuvdec_m_filter_2);
int iSetUVDEC_3_uvdec_m_filter_5(unsigned int uuvdec_m_filter_5);
int iSetUVDEC_3_uvdec_m_filter_4(unsigned int uuvdec_m_filter_4);
int iSetPRECROP_1_precrop_hmin(unsigned int uprecrop_hmin);
int iSetPRECROP_1_precrop_hmax(unsigned int uprecrop_hmax);
int iSetPRECROP_2_precrop_vmin(unsigned int uprecrop_vmin);
int iSetPRECROP_2_precrop_vmax(unsigned int uprecrop_vmax);
int iSetPOSTCROP1_1_postcrop1_hmin(unsigned int upostcrop1_hmin);
int iSetPOSTCROP1_1_postcrop1_hmax(unsigned int upostcrop1_hmax);
int iSetPOSTCROP1_2_postcrop1_vmin(unsigned int upostcrop1_vmin);
int iSetPOSTCROP1_2_postcrop1_vmax(unsigned int upostcrop1_vmax);
int iSetPOSTCROP2_1_postcrop2_hmin(unsigned int upostcrop2_hmin);
int iSetPOSTCROP2_1_postcrop2_hmax(unsigned int upostcrop2_hmax);
int iSetPOSTCROP2_2_postcrop2_vmin(unsigned int upostcrop2_vmin);
int iSetPOSTCROP2_2_postcrop2_vmax(unsigned int upostcrop2_vmax);
int iSetPIPE_CTRL_vpc_out2_sel(unsigned int uvpc_out2_sel);
int iSetPIPE_CTRL_vpc_out2_pipe_en(unsigned int uvpc_out2_pipe_en);
int iSetPIPE_CTRL_vpc_out1_pipe_en(unsigned int uvpc_out1_pipe_en);
int iSetPIPE_INFOR_1_vpc_pipe_vp_infor1(unsigned int uvpc_pipe_vp_infor1);
int iSetPIPE_INFOR_2_vpc_pipe_vp_infor2(unsigned int uvpc_pipe_vp_infor2);
int iSetPIPE_INFOR_3_vpc_pipe_vp_infor3(unsigned int uvpc_pipe_vp_infor3);
int iSetPIPE_BUSY_INFOR_vpc_pipe_busy(unsigned int uvpc_pipe_busy);
int iSetY_SUM_y_sum_stat(unsigned int uy_sum_stat);
int iSetU_SUM_u_sum_stat(unsigned int uu_sum_stat);
int iSetV_SUM_v_sum_stat(unsigned int uv_sum_stat);

#endif // __VPC_PIPE_NMANAGER_C_UNION_DEFINE_H__
